package com.bocloud.cmp.dao;

import java.util.List;
import java.util.Map;

import com.bocloud.cmp.entity.resource.PortGroup;
import com.bocloud.common.model.Param;
import com.bocloud.common.model.SimpleBean;
import com.bocloud.database.core.intf.GenericDao;

/**
 * 端口组DAO接口
 * 
 * @author beyond
 *
 */
public interface PortGroupDao extends GenericDao<PortGroup, Long> {

	public List<SimpleBean> list(List<Param> params, Map<String, String> sorter) throws Exception;

	public int count(List<Param> params) throws Exception;

	/**
	 * 根据云供应商ID删除
	 * 
	 * @param vendorId
	 * @return
	 * @throws Exception
	 */
	public boolean removeByVid(Long vendorId, Long userId) throws Exception;

	/**
	 * 删除
	 * 
	 * @param id
	 * @param userId
	 * @return
	 * @throws Exception
	 */
	public Boolean remove(Long id, Long userId) throws Exception;

	/**
	 * 根据网络ID删除
	 * 
	 * @param networkId
	 * @param userId
	 * @return
	 * @throws Exception
	 */
	public boolean removeByNetwork(Long networkId, Long userId) throws Exception;

	/**
	 * 根据ID查询
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public PortGroup query(Long id) throws Exception;

	/**
	 * 根据网络ID查询
	 * 
	 * @param networkId
	 * @return
	 * @throws Exception
	 */
	public List<PortGroup> listByNetwork(Long networkId) throws Exception;
}
